/* function a(){
    console.log('a');
}
b=new a();
console.log(b.__proto__,'---',a.prototype.__proto__.__proto__); */
/* function a(){
    let name='a';
    let c={};
    function getname(){
                  return name;
                 }
    c.getname=getname;
    return c;
}
b=new a();
console.log(b.getname()); */
// var str = "Is is the cost of of gasoline going up up";
// var patt1 = /\b([a-z]+) \1\b/ig;
// console.log(str.match(patt1));
/* var str = "http://www.runoob.com:80/html/html-tutorial.html";
var patt1 = /(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)/;
arr = str.match(patt1);
for (var i = 0; i < arr.length ; i++) {
    console.log(arr[i]);
    console.log("<br>");
} */
/* for(var i=0;i<5;i++){
    console.log(i);
} */
/* function foo() {
    console.log( a ); // 3
}
function bar() {
    var a = 3;
    foo();
}
var a = 2;
bar(); */

/* var a={
    b:2,
    c:3,
    d:4
}
for(let ch in a){
    console.log(ch);
} */
/* var myArray = [ 1, 2, 3 ];
        var it = myArray[Symbol.iterator]();
        var a=it.next(); // { value:1, done:false } 
        it.next(); // { value:2, done:false } 
        it.next(); // { value:3, done:false } 
        it.next(); // { done:true }
        console.log(a,it); */

 /*        var myObject = {
            a: 2,
            b: 3
            };
            Object.defineProperty( myObject, Symbol.iterator, {
            enumerable: false,
            writable: false,
            configurable: true,
            value: function() {
            var o = this;
            var idx = 0;
            var ks = Object.keys( o );
            return {
            next: function() {
            return {
            value: o[ks[idx++]],
            done: (idx > ks.length)
            };
            }
            };
            }
            } );
            // 手动遍历 myObject
            var it = myObject[Symbol.iterator]();
            it.next(); // { value:2, done:false } 
            it.next(); // { value:3, done:false } 
            it.next(); // { value:undefined, done:true }
            // 用 for..of 遍历 myObject
            for (var v of myObject) {
            console.log( v );
            }
            // 2
            // 3 */

function a(){
    console.log('==');
}
let b=false;
let c=Symbol('nih');
let d={
    name:'niaho'
}
// console.log(a.toString(),b.toString(),c.toString());
console.log(d.toString());
console.log(null==undefined);